from django.http import JsonResponse


def CommonReponse(code=2000, message="请求成功!", safe=True, **kwargs):
    data = {"code": code, "message": message}
    if kwargs:
        data.update(kwargs)
    return JsonResponse(data, safe=safe)
